/** @format */
import { createRouter, createWebHistory } from "vue-router";
const routes = [
  {
    path: "/",
    name: "Home",
    component: () => import("../components/Home"),
    children: [
      {
        path: "Chassis",
        component: () => import("../views/Chassis"),
      },
      {
        path: "Dissipate",
        component: () => import("../views/Dissipate"),
      },
      {
        path: "Graphicsview",
        component: () => import("../views/Graphicsview"),
      },
      {
        path: "Keyboardview",
        component: () => import("../views/Keyboardview"),
      },
      {
        path: "Mouseview",
        component: () => import("../views/Mouseview"),
      },
      {
        path:'/Login',
        component:()=>import('../components/Login')
      },
      {
        path:'/Register',
        component:()=>import('../components/Register')
      }
    ],
  },
  {
    path:'/Cart',
    name:'Cart',
    component:()=>import('../components/Cart')
  },
  {
    path:'/Order',
    name:'Order',
    component:()=>import('../components/Order')
  },
  {
    path:'/Product',
    name:'Product',
    component:()=>import('../components/Product')
  },
  {
    path:'/Usercenter',
    name:'Usercenter',
    component:()=>import('../components/Usercenter')
  }
];
const router = createRouter({
  history: createWebHistory(), //路由模式
  routes,
});
export default router; //导出
